#include <bits/stdc++.h>
using namespace std;
int n,a;
multiset <int> r,b;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=0;i<n;i++) {
        scanf("%d",&a);
        r.insert(a),b.insert(a);
    }
    while(1){
        auto f = r.begin();
        auto t = b.upper_bound(*f);
        if(t == b.end()) break;
        r.erase(f),b.erase(*f),b.erase(t);
        n--;
    }printf("%d",n);
}
